* xterm.c (x_focus_changed): Check if daemonp when sending focus in
authorJan D. <jan.h.d@swipnet.se>
Sun, 21 Oct 2012 14:53:28 +0000 (16:53 +0200)
committerJan D. <jan.h.d@swipnet.se>
Sun, 21 Oct 2012 14:53:28 +0000 (16:53 +0200)
event.

src/ChangeLog
src/xterm.c

index 64df3c45a768a176947e47821d537dc3f5387933..cf506da51c248ae33c0951a2b6ce4a6f7cce3bdf 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-21  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * xterm.c (x_focus_changed): Check if daemonp when sending focus in
+       event (Bug#12681).
+
 2012-10-21  Glenn Morris  <rgm@gnu.org>
 
        * lisp.mk (lisp): Add cp51932.el and eucjp-ms.el.
index a4c3e125d8dd2adc184a178c2b14ccec4e9a7f73..8b005873f4d136f3ef1d1c7f6df0c42515257e94 100644 (file)
@@ -3448,7 +3448,8 @@ x_focus_changed (int type, int state, struct x_display_info *dpyinfo, struct fra
 
           /* Don't stop displaying the initial startup message
              for a switch-frame event we don't need.  */
-          if (NILP (Vterminal_frame)
+          /* When run as a deamon, Vterminal_frame is always NIL.  */
+          if ((NILP (Vterminal_frame) || EQ (Fdaemonp(), Qt))
               && CONSP (Vframe_list)
               && !NILP (XCDR (Vframe_list)))
             {